import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../styles/styles.dart';

TextStyle ytTextStyle(
    {double fontSize = 12,
    Color? color,
    FontWeight? fontWeight,
    double? height,
    TextDecoration? textDecoration}) {
  return TextStyle(
      color: color ?? Colour.mainTextColor,
      fontSize: ScreenUtil().setSp(fontSize),
      // fontSize: fontSize,
      fontWeight: fontWeight ?? FontWeight.normal,
      height: height ?? 1.2,
      decoration: textDecoration ?? TextDecoration.none,
      fontFamilyFallback: const ["PingFang SC", "Heiti SC"]
      // fontFamily: 'helvetica',
      );
}

///自定义DIN字体
TextStyle dinTextStyle({
  double fontSize = 12,
  Color? color,
  FontWeight? fontWeight,
  double? height,
}) {
  return TextStyle(
    color: color ?? Colour.mainTextColor,
    fontSize: ScreenUtil().setSp(fontSize),
    fontWeight: fontWeight ?? FontWeight.normal,
    height: height ?? 1.0,
    decoration: TextDecoration.none,
    fontFamily: 'DIN',
    // package: 'fairlend'
  );
}
